/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package action.Management;

import Database.ManagementDAO;
import Models.*;
import com.opensymphony.xwork2.ActionSupport;
import java.util.*;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Result;

/**
 *
 * @author trang_000
 */
public class ManageAction extends ActionSupport{
    private List<Profile> profilesList;

    public List<Profile> getProfilesList() {
        return profilesList;
    }

    public void setProfilesList(List<Profile> profilesList) {
        this.profilesList = profilesList;
    }
    
    private ManagementDAO manageDAO = new ManagementDAO();
    
     @Action(value = "management", results = {
        @Result(name = "success", location = "/Management/ManageLogin.jsp")      
    })
    public String management(){
       // profilesList = manageDAO.getAllProfile();
        return SUCCESS;
    }
    
     @Action(value = "Management/home", results = {
        @Result(name = "success", location = "/Management/ManageHome.jsp")      
    })
    public String home(){
        profilesList = manageDAO.getAllProfile();
        return SUCCESS;
    }
    
}
